package com.centaline.androidsalesblog.model.databaseobject;

import com.google.gson.annotations.SerializedName;

import org.litepal.crud.DataSupport;

import java.util.ArrayList;

/**
 * 区域
 * Created by guilin on 16/1/19.
 */
public class RegionDo extends DataSupport {

    private String cityCode;
    private String c_distname;
    private String scp_mkt;
    @SerializedName("GscpLists")
    private ArrayList<GscpDo> list;

    public String getCityCode() {
        return cityCode;
    }

    public void setCityCode(String cityCode) {
        this.cityCode = cityCode;
    }

    public String getC_distname() {
        return c_distname;
    }

    public void setC_distname(String c_distname) {
        this.c_distname = c_distname;
    }

    public String getScp_mkt() {
        return scp_mkt;
    }

    public void setScp_mkt(String scp_mkt) {
        this.scp_mkt = scp_mkt;
    }

    public ArrayList<GscpDo> getList() {
        return list;
    }

    public void setList(ArrayList<GscpDo> list) {
        this.list = list;
    }

    /**
     * 查询板块
     */
    public void findGscopList() {
        list = new ArrayList<>();
        list.addAll(DataSupport.where("cityCode = ? and scp_mkt = ?", cityCode, scp_mkt)
                .find(GscpDo.class));
    }
}
